<template>
  <view class="set-meal-item" @click="onClickItem">
    <image class="img" :src="item.pic_URL"></image>
    <!-- <image
      class="img"
      src="https://files.yzsheng.com/images/package/taocanka1.png"
    ></image> -->
    <view class="flex color-999 font-24 foot">
      <view class="flex-1"
        ><text class="color-333 font-40">￥{{ item.discount_Price }}</text
        ><text class="price">￥{{ item.normal_Price }}</text></view
      >
      <view>使用日期：{{ item.deadline }}</view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {}
  },
  props: {
    item: {
      type: Object,
      default: () => {
        return {}
      },
    },
  },
  created() {},
  methods: {
    onClickItem(id) {
      // this.$emit('click', { data: this.item, type: 2 })
      uni.navigateTo({
        url:
          '/pages_afterSales/selectSetMenu/selectSetMenu?type=2&packageId=' +
          this.item.id,
      })
    },
  },
}
</script>

<style lang="scss">
.set-meal-item {
  margin: 40rpx 26rpx;
  position: relative;
  height: 310rpx;
  border-radius: 25rpx;

  box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1);
  .img {
    width: 100%;
    height: 100%;
    border-radius: 25rpx;
  }
  &:first-child {
    margin-top: 20rpx;
  }
  .foot {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    font-weight: 500;
    padding: 0 30rpx;
    height: 60rpx;
    line-height: 60rpx;
    background: rgba(255, 255, 255, 1);
    border-radius: 0 0 25rpx 25rpx;

    .font-40 {
      font-size: 40rpx;
      font-weight: bold;
    }

    .price {
      text-decoration: line-through;
      padding-left: 10rpx;
    }
  }
}
</style>
